package com.framework.buss.bridge.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.framework.core.mybatis.config.AutoField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("buss_bridge_value")
@ApiModel(value="buss_bridge_value", description="桥梁报表值")
public class BridgeValue implements Serializable {
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    @AutoField("varchar(32) default '' COMMENT '主键'")
    private String id;

    @ApiModelProperty(value = "key值")
    @AutoField("varchar(20) default '' COMMENT 'key值'")
    private String title;

    @ApiModelProperty(value = "value值")
    @AutoField("text default '' COMMENT 'value值'")
    private String value;

    @ApiModelProperty(value = "桥梁编号")
    @AutoField("varchar(32) default '' COMMENT '桥梁编号'")
    private String bridgeId;

    /**创建人*/
    @ApiModelProperty(value = "创建人")
    @AutoField("varchar(32) default '' COMMENT '创建人'")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    /**创建日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    @AutoField("datetime COMMENT '创建日期'")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**更新人*/
    @ApiModelProperty(value = "更新人")
    @AutoField("varchar(32) default '' COMMENT '更新人'")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    /**更新日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    @AutoField("datetime COMMENT '更新日期'")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "备注")
    @AutoField("varchar(100) default '' COMMENT '更新人'")
    private String remark;

    @ApiModelProperty(value = "版本")
    private long version;
}
